<!DOCTYPE html>
<html>

<head>
    <meta charset="UTF-8">
    <meta name="renderer" content="webkit">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="viewport"
          content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no"/>
    <title>美好生活</title>
    <link rel="stylesheet" type="text/css" href="../../static/admin/layui/css/layui.css"/>
    <link rel="stylesheet" type="text/css" href="../../static/admin/css/admin.css"/>
</head>

<body>
<div class="page-content-wrap">
    <form class="layui-form" action="">
        <div class="layui-form-item">
            <div class="layui-inline tool-btn">
                <button class="layui-btn layui-btn-small layui-btn-normal addBtn hidden-xs" data-url="car_manager_add_model.html"><i
                        class="layui-icon">&#xe654;</i></button>
                <button class="layui-btn layui-btn-small layui-btn-warm freshBtn hidden-xs"
                        data-url="menu-add.html"><i class="iconfont" onclick="location.reload();">&#xe656;</i></button>
            </div>
            <div class="layui-inline">
                <input type="text" name="title" required lay-verify="required" placeholder="请输入手机号/车牌号" autocomplete="off"
                       class="layui-input">
            </div>
            <button class="layui-btn layui-btn-normal" lay-submit="search">搜索</button>
        </div>
    </form>
    <div class="layui-form" id="table-list">
        <table class="layui-table" lay-skin="line">
            <colgroup>
                <col width="50">
                <col class="hidden-xs" width="50">
                <col class="hidden-xs" width="100">
                <col class="hidden-xs" width="100">
                <col>
                <col width="80">
                <col width="130">
            </colgroup>
            <thead>
            <tr>
                <th class="hidden-xs"><input type="checkbox" name="" lay-skin="primary" lay-filter="allChoose"></th>
                <th class="hidden-xs">会员号</th>
                <th >会员名称</th>
                <th >车牌号</th>
                <th class="hidden-xs">家庭地址</th>
                <th class="hidden-xs">备注</th>
                <th >VIP</th>
                <th class="hidden-xs">最后维护时间</th>
                <th class="hidden-xs">操作</th>
            </tr>
            </thead>
            <tbody>
            <tr id='node-1' class="parent collapsed">
                <td width='3%' class="hidden-xs" class="hidden-xs"><input type="checkbox" name="" lay-skin="primary" data-id="1"></td>
                <td width='5%' class="hidden-xs">0001</td>
                <td width='10%'><a href="car_manager_detail.html" style="display:block;font-weight: bold;background-color:#1E9FFF;">固始小奶狗</a></td>
                <td width='10%'>豫S-12345</td>
                <td width='15%' class="hidden-xs">固始-胡族街道1201号</td>
                <td width='25%' class="hidden-xs">这个人不得了，家里有猪！这个人不得了，家里有猪！这个人不得了，家里有猪！这个人不得了，家里有猪！这个人不得了，家里有猪！这个人不得了，家里有猪！</td>
                <td width='5%'>是</td>
                <td width='10%' class="hidden-xs">2020-01-04 21:03</td>
                <td width='13%' class="hidden-xs">
                    <div class="layui-inline">
                        <button class="layui-btn layui-btn-mini layui-btn-normal  add-btn" data-id="1"
                                data-url="car_matain_add_model.html"><i class="layui-icon">&#xe654;</i></button>
                        <button class="layui-btn layui-btn-mini layui-btn-normal  edit-btn" data-id="1"
                                data-url="car_manager_edit_model.html"><i class="layui-icon">&#xe642;</i></button>
                        <button class="layui-btn layui-btn-mini layui-btn-danger del-btn" data-id="1"
                                data-url="menu-add.html"><i class="layui-icon">&#xe640;</i></button>
                    </div>
                </td>
            </tr>
            </tbody>
        </table>
    </div>
</div>
<script src="../../static/admin/layui/layui.js" type="text/javascript" charset="utf-8"></script>
<script src="../../static/admin/js/common.js" type="text/javascript" charset="utf-8"></script>
<script>
    layui.use(['jquery'], function () {
        var $ = layui.jquery;
        //修改状态
        $('#table-list').on('click', '.table-list-status', function () {
            var That = $(this);
            var status = That.attr('data-status');
            var id = That.parent().attr('data-id');
            if (status == 1) {
                That.removeClass('layui-btn-normal').addClass('layui-btn-warm').html('隐藏').attr('data-status', 2);
            } else if (status == 2) {
                That.removeClass('layui-btn-warm').addClass('layui-btn-normal').html('显示').attr('data-status', 1);

            }
        })
        //栏目展示隐藏
        $('.showSubBtn').on('click', function () {
            var _this = $(this);
            var id = _this.attr('data-id');
            var parent = _this.parents('.parent');
            var child = $('.child-node-' + id);
            var childAll = $('tr[parentid=' + id + ']');
            if (parent.hasClass('collapsed')) {
                _this.html('-');
                parent.addClass('expanded').removeClass('collapsed');
                child.css('display', '');
            } else {
                _this.html('+');
                parent.addClass('collapsed').removeClass('expanded');
                child.css('display', 'none');
                childAll.addClass('collapsed').removeClass('expanded').css('display', 'none');
                childAll.find('.showSubBtn').html('+');
            }

        })
    });
</script>
</body>

</html>